package com.sumainfor.pc.dev.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.dev.service.MovableHousingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  首页活动-房源中间表
 * <p>
 *
 * @author: zhoucong
 * @create: 2019-05-09 19:19
 **/
@Controller
@RequestMapping("/movableHousing")
public class MovableHousingController {

    @Autowired
    MovableHousingService movableHousingService;

    /**
    * <p>
    * 查询首页活动-房源中间表
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @GetMapping("/getMovableHousing")
    public JsonResult getMovableHousing(@RequestParam Map<String,Object> params){
        return movableHousingService.getMovableHousing(params);
    }

    /**
    * <p>
    * 增加首页活动-房源中间表
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/insertMovableHousing")
    public JsonResult insertMovableHousing(@RequestBody Map<String,Object> params){
        return movableHousingService.insertMobHou(params);
    }

    /**
    * <p>
    * 删除首页活动-房源中间表
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/deleteMovableHousing")
    public JsonResult deleteMovableHousing(@RequestBody Map<String,Object> params){
        return movableHousingService.deleteMobHou(params);
    }

}
